package com.itheima.homework;

import java.util.Scanner;

public class test06 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个对称的字符串:");
        String s = sc.next();
        demo(s);
    }
    public static void demo(String s){
        String s1 = "";
        for (int i = s.length()-1; i >=0 ; i--) {
            char c = s.charAt(i);
            s1 += c;
        }
        if(s1.equals(s)){
            System.out.println("是对称字符串");
        }else {
            System.out.println("不是对称字符串");
        }
    }
}
